/*
* $Id: HousingManagerDialog.h lexus $
*
* Copyright 2009 by Alexey Volokitin
* All rights reserved
*
*/
#ifndef _HOUSING_MANAGER_DIALOG_H_
#define _HOUSING_MANAGER_DIALOG_H_

class CHousingManagerDialog : public CDialog
{
	CStatic m_TypeHouse;
	CStatic m_TypeFrame;
	CEdit m_FamilyHouse;
	CEdit m_NameHouse;
	CButton m_ChangeHousing;
	CButton m_DeleteHousing;
	CButton m_DeleteFamily;
	CListBox m_HousingList;
	CListBox m_FamiliesList;
	CListBox m_FamilyHouseList;
	CComboBox m_FreeHousing;
private:
	struct housing{
		int m_nTypeHousing;
		int m_nTypeFrame;
		int m_nFamily;
		std::tstring m_strName;
		housing();
		housing(int nTypeHousing, int nTypeFrame, int nFamily, std::tstring strName);
	};
	std::map<int, housing> m_aHousings;
	std::map<int, std::tstring> m_aFamilies;
	void UpdateHouseDb(int nId);
protected:
	DECLARE_MESSAGE_MAP();
	virtual BOOL OnInitDialog();
	virtual void DoDataExchange(CDataExchange* pDX);
	afx_msg void OnHouseSelChange();
	afx_msg void OnFamilySelChange();
	afx_msg void OnHouseAdd();
	afx_msg void OnHouseFamilyAdd();
	afx_msg void OnHouseFamilyDelete();
	afx_msg void OnHouseChange();
	afx_msg void OnHouseDelete();
public:
	CHousingManagerDialog(CWnd* pParent);
	virtual ~CHousingManagerDialog();
public:
};

#endif/*_HOUSING_MANAGER_DIALOG_H_*/